package com.hlhj.funlike_business.presenter;

import android.content.Context;

import com.example.mymvp.mvp.BasePresenter;
import com.hlhj.funlike_business.activity.CashierAty;
import com.hlhj.funlike_business.bean.TotalBean;
import com.hlhj.funlike_business.bean.WaterListBean;
import com.hlhj.funlike_business.moudle.CashierMoudle;
import com.hlhj.funlike_business.views.CashierView;

import java.util.List;

public class CashierPresenter extends BasePresenter<CashierMoudle,CashierView> implements CashierMoudle.getTotalMoney {
    @Override
    public void createModule() {
        module = new CashierMoudle();
        module.setListener(this);
    }

    public void LoadTotalMoney(Context context){
        module.LoadTotalMoney(context);
    }

    public void LoadWaterList(Context context,int p){
        module.LoadWaterList(context,p);
    }

    @Override
    public void loadTotalMoney(TotalBean.DataBean dataBean) {
        getView().showMoney(dataBean);
    }

    @Override
    public void loadWaterList(List<WaterListBean.DataBeanX.DataBean> dataBeans) {
        getView().showWaterList(dataBeans);
    }
}
